#pragma once
#include <vector>
using namespace std;
class JBoundary;
class JPiece;
class JPoint;

class JGraph
{
public:
	JGraph();
	virtual ~JGraph();

private:
	vector<JPiece*>		m_pPieces;
	vector<JBoundary*>	m_pBoundaries;
	vector<JPoint*>		m_pPoints;

protected:
	void			Cleanup();

public:
	int				GetBoundaryCount();
	JBoundary*		GetBoundary(int _idx);

	int				GetPieceCount();
	JPiece*			GetPiece(int _idx);

	int				GetPointCount();
	JPoint*			GetPoint(int _idx);

	JBoundary*		GetBoundary(int _ptIdx1, int _ptIdx2);

	void			AddPoint(JPoint* _pPoint);
	void			AddBoundary(JBoundary* _pBoundary);
	void			AddPiece(JPiece* _pPiece);

	void			UpdatePointsIds();
};

